package com.hqyj.manager.service;

import com.github.pagehelper.PageInfo;
import com.hqyj.pojo.Category;
import com.hqyj.pojo.Product;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

public interface ProductsService {
    List<Product> getAll();
    PageInfo<Product> findAllProduct(Integer currentPage, Integer pageSize);
    PageInfo<Product> sreachProduct(Integer currentPage, Integer pageSize,Integer categoryId,Integer reviewCount, String searchStr);
    Boolean deleteProductById(Integer id);

    boolean update(Integer id);

    PageInfo<Category> slectCategory(Integer pageNum,Integer pageSize,String sreachCategory);
    List<Category> slectCategory();

    Boolean deleteCategoryById(Integer id);

    Boolean categoryAdd(String name);

    Integer deleteByIds(String oIds);

    HashMap<String, Object> productAdd(Product product, String url1, String url2);

    Boolean deleteProductByIds(String oIds);

    Product sreachProductById(Integer uId);

    HashMap<String, Object> productUpdate(Product product, String url1, String url2);

    Category sreachCategory(Integer id);

    HashMap<String, Object> categoryUpdate(Category category);

    void excelWrite(HttpServletResponse response);
}
